<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="../../common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@include file="../../common/common-css.jsp" %>
<%@include file="../../common/common-js.jsp" %>
 <%@include file="../../common/init.jsp" %>
<link rel="stylesheet" type="text/css"
	href="${pageContext.servletContext.contextPath }/css/fenyecss.css" />
	<script type="text/javascript">
function permissio(id){
	 var url = "${pageContext.servletContext.contextPath }/background/resources/permissioRole.html?roleId="+id;
	 var h_sp1 = 400;
	 var w_sp1 = 350;
	//兼容IE，firefox,google.模态窗口居中问题
	 var iTop2 = (window.screen.availHeight - 20 - h_sp1) / 2;
	 var iLeft2 = (window.screen.availWidth - 10 - w_sp1) / 2;
	 var params = 'menubar:no;dialogHeight=' + h_sp1 + 'px;dialogWidth=' + w_sp1 + 'px;dialogLeft=' + iLeft2 + 'px;dialogTop=' + iTop2 + 'px;resizable=yes;scrollbars=0;resizeable=0;center=yes;location:no;status:no;scroll:no'
	 window.showModalDialog(url, window, params);
	 //location.href=url;
}

</script>
	<style type="text/css">
	  input{font-size: 12px}
	</style>
</head>
<body>
<form id="fenye" name="fenye" action="${pageContext.servletContext.contextPath }/background/order/query.html" method="post">
     <div class="right" >
        	<div class="volume">
            	<img src="${pageContext.servletContext.contextPath }/images/toleft.png" style="margin:23px 0 0 2px;_margin:23px 0 0 0px;" />
            </div>
        	<div class="rightcon ">
            	<div class="title">
                	您当前的位置：首页 > 订单管理 > 订单列表
                </div>
                <input type="hidden" name="pageNow" id="pageNow"/>
                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                	<tr>
                    	<td class="odd">服务编号：
                        </td>
                        <td class="even"><input type="text" name="orderNo" value="${order.orderNo }" style="height: 20px"/>
                        </td>
                        <td class="odd">用户：
                        </td>
                        <td class="even"><input type="text" name="username" value="${order.username }" style="height: 20px"/>
                        </td>
                         <td class="odd">服务商：
                        </td>
                        <td class="even"><input type="text" name="servicename" value="${order.servicename }" style="height: 20px"/>
                        </td>
                        <td class="odd"  rowspan="2"  >
                        	<input type="image" src="${pageContext.servletContext.contextPath }/images/cx.png" width="101" height="46"/>
                        </td>
                    </tr>
                    <tr>
                    	<td class="odd">服务状态：：
                        </td>
                        <td class="even"><select name="orderStatus">
								<option value="">请选择</option>
								<option value="A" <c:if test="${order.orderStatus eq 'A' }">selected="selected"</c:if>>已下单</option>
								<option value="B" <c:if test="${order.orderStatus eq 'B' }">selected="selected"</c:if>>已预约</option>
								<option value="C" <c:if test="${order.orderStatus eq 'C' }">selected="selected"</c:if>>已完成</option>
								<option value="D" <c:if test="${order.orderStatus eq 'D' }">selected="selected"</c:if>>已回访</option>
								<option value="E" <c:if test="${order.orderStatus eq 'E' }">selected="selected"</c:if>>用户取消</option>
								<option value="F" <c:if test="${order.orderStatus eq 'F' }">selected="selected"</c:if>>服务商取消</option>
						</select>
                        </td>
                        <sec:authorize ifAnyGranted="ROLE_serviceProvider_editpassword">
                        <td class="odd">订单查看状态
                        </td>
                        <td class="even"><select name="orderflag">
								<option value="0">请选择</option>
								<option value="2" <c:if test="${order.orderflag eq '2' }">selected="selected"</c:if>>未读</option>
								<option value="1" <c:if test="${order.orderflag eq '1' }">selected="selected"</c:if>>已读</option>
						</select>
                        </td>
                        </sec:authorize>
                    </tr>
                </table>
                 <table border="0" cellpadding="0" cellspacing="0" class="table2">
                 	<tr class="title">
                        <td width="10%" align="center">
                        	服务编号
                        </td>
                         <td width="10%" align="center">
                        	用户
                        </td>
                        <td  width="10%" align="center">
                        	提交时间
                        </td>
                         <td width="10%" align="center">
                        	服务状态
                        </td>
                        <td width="10%" align="center">
                        	服务商
                        </td>
                        <td width="10%" align="center">
                        	呼叫中心
                        </td>
                        <td width="10%" style=" border-right:none;" align="center">
                        	操作
                        </td>
                    </tr>
                    <c:forEach var="role" items="${pageView.records}">
                    <tr class="odd" <sec:authorize ifAnyGranted="ROLE_serviceProvider_editpassword">
					<c:if test="${role.orderflag eq 2 }">style="background:#858585;"</c:if>
					</sec:authorize>>
                        <td align="center">
                        	${role.orderNo}
                        </td>
                         <td align="center">
                        	${role.username}
                        </td>
                        <td  align="center">
                        	${role.orderTime}
                        </td>
                         <td align="center">
                        	<c:if test="${role.orderStatus eq 'A'}">
						 已下单
			              </c:if>
			              <c:if test="${role.orderStatus eq 'B'}">
			             	已预约
			              </c:if>
			              <c:if test="${role.orderStatus eq 'C'}">
			                 	 已完成
			              </c:if>
			              <c:if test="${role.orderStatus eq 'D'}">
			                            已回访
			              </c:if>
			               <c:if test="${role.orderStatus eq 'F'}">
			                 服务商取消
			              </c:if>
			              <c:if test="${role.orderStatus eq 'E'}">
			              用户取消
			              </c:if>
                        </td>
                        <td align="center">
                        	${role.servicename}
                        </td>
                         <td align="center">
                        	${role.callName}
                        </td>
                        <td  style=" border-right:none;" align="center">
                        	<sec:authorize ifAnyGranted="ROLE_order_show">
            	<a href="${pageContext.servletContext.contextPath }/background/order/getById.html?id=${role.id}&&typeKey=0">
            	详细</a>
            	&nbsp;&nbsp;</sec:authorize>
                        </td>
                    </tr>
                    </c:forEach>
                     <tr>
                    <%@include file="../../common/webfenye.jsp" %>
                    </tr>
                 </table>
                
            </div><!--rightcon-->
        </div>     
</form>
</body>
</html>